for i in range(1, 10):
    for j in range(1, i+1):
        mun = i * j
        print(f'{j}*{i}={mun}', end='\t')
    print()

print('-----------------------------------------------------------------------------------')

for i in range(9, 0, -1):
    for j in range(i, 0, -1):
        mun = i * j
        print(f'{j}*{i}={mun}', end='\t')
    print()
